import React from 'react'
import { Outlet, useNavigate } from 'react-router-dom'
export default function Home() {
  const navigate = useNavigate()
  const toMusicHandle = () => {
    navigate('/main/home/music/?name=xyue&id=001')
  }
  const toNewsHandle = () => {
    navigate('/main/home/news/?name=xiaoy&id=002')
  }
  return (
    <div>
      <h3>我是Home的内容</h3>
      <button onClick={toMusicHandle}>music</button>
      <button onClick={toNewsHandle}>news</button>
      <Outlet />
    </div>
  )
}
